1. Field of the Invention
The present invention relates to computer networks. More specifically, the present invention relates to a method and an apparatus that facilitates long-lived domain name system (DNS) queries.
2. Related Art
It is presently common for a client to use a variety of services over a network. For example, a computer running Apple's iPhoto™ may share another computer's iPhoto™ album over a network. One prerequisite for using a service over a network is that, prior to using the service, a client needs to identify a specific instance of that service, for example by obtaining the service's host address and port number. It is therefore important for a client to obtain and maintain accurate and updated information for services in a network.
Clients typically become aware of a service through some type of service discovery mechanism. Although a service discovery mechanism can be provided through different network protocols, it is typically impractical to use underlying protocols that are not readily available. The existing domain name system (DNS) protocol, because of its ubiquity and extendibility, has proven to be an effective protocol for local-area service discovery, and is an excellent candidate for providing wide-area service discovery beyond the local network. In particular, the Internet Engineering Task Force (IETF) Request for Comments (RFC) 2761 specifies an extension to DNS (EDNS0), which allows a DNS message to deliver resource records (RRs) that carry service meta-information.
Unfortunately, while the extended DNS allows a name server to provide service information, it does not enable a name server to deliver continuously updated service information to the clients. A service update occurs when a service instance appears or disappears, or when the state of a service changes. Such updates are becoming progressively more frequent, as networks become more dynamic, and services become more versatile and mobile.
A traditional DNS query is “one-shot”—a name server answers a query only once, and returns only results available at that moment. Thus, when a client queries a name server, it only obtains information for a service instance at a specific point in time. To maintain up-to-date service information, a client has to periodically poll the name server. This solution has drawbacks, because a low polling rate can leave the client with stale information, and a high polling rate can have an adverse impact on network and server performance.
Hence, what is needed is a method and an apparatus that facilitates long-lived DNS queries which allow a client to obtain updated service information without polling the name server.